<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>参数 | Ranorex Studio用户手册</title>
    <meta name="generator" content="VuePress 1.8.0">
    <link rel="icon" href="/ranorex/img/favicon.ico">
    <script data-ad-client="ca-pub-7828333725993554" async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <meta name="description" content="用户指南的第一章将引导您完成创建第一个自动化测试用例的过程。了解如何在不编码的情况下自动执行测试、验证条目、查看测试报告等。后面的章节涵盖高级主题，例如使用 Selenium WebDriver 进行跨浏览器测试和为移动应用程序测试准备设备。">
    <meta name="keywords" content="用户指南的第一章将引导您完成创建第一个自动化测试用例的过程。了解如何在不编码的情况下自动执行测试、验证条目、查看测试报告等。后面的章节涵盖高级主题，例如使用 Selenium WebDriver 进行跨浏览器测试和为移动应用程序测试准备设备。">
    <meta name="baidu-site-verification" content="7F55weZDDc">
    <meta name="theme-color" content="#11a8cd">
    
    <link rel="preload" href="/ranorex/assets/css/0.styles.4f9f6236.css" as="style"><link rel="preload" href="/ranorex/assets/js/app.99bafa68.js" as="script"><link rel="preload" href="/ranorex/assets/js/2.ec9fdd2b.js" as="script"><link rel="preload" href="/ranorex/assets/js/65.5a22e1db.js" as="script"><link rel="prefetch" href="/ranorex/assets/js/10.537ce4e0.js"><link rel="prefetch" href="/ranorex/assets/js/100.f3e3cb00.js"><link rel="prefetch" href="/ranorex/assets/js/101.6cef7562.js"><link rel="prefetch" href="/ranorex/assets/js/102.f88ac37b.js"><link rel="prefetch" href="/ranorex/assets/js/103.3f4ef0af.js"><link rel="prefetch" href="/ranorex/assets/js/104.fb8866c5.js"><link rel="prefetch" href="/ranorex/assets/js/105.39bd6f16.js"><link rel="prefetch" href="/ranorex/assets/js/106.6d99777c.js"><link rel="prefetch" href="/ranorex/assets/js/107.66c18a3d.js"><link rel="prefetch" href="/ranorex/assets/js/108.07d8965b.js"><link rel="prefetch" href="/ranorex/assets/js/109.3b85e1c0.js"><link rel="prefetch" href="/ranorex/assets/js/11.0369598b.js"><link rel="prefetch" href="/ranorex/assets/js/110.540c2bc9.js"><link rel="prefetch" href="/ranorex/assets/js/111.68dee6c5.js"><link rel="prefetch" href="/ranorex/assets/js/112.4ef2c029.js"><link rel="prefetch" href="/ranorex/assets/js/113.e4324abb.js"><link rel="prefetch" href="/ranorex/assets/js/114.76da90e6.js"><link rel="prefetch" href="/ranorex/assets/js/115.2572c21b.js"><link rel="prefetch" href="/ranorex/assets/js/116.a31be93f.js"><link rel="prefetch" href="/ranorex/assets/js/117.f184e662.js"><link rel="prefetch" href="/ranorex/assets/js/118.4784e0db.js"><link rel="prefetch" href="/ranorex/assets/js/119.bc556dc9.js"><link rel="prefetch" href="/ranorex/assets/js/12.b54dc37a.js"><link rel="prefetch" href="/ranorex/assets/js/120.1884f7d3.js"><link rel="prefetch" href="/ranorex/assets/js/121.cd6389de.js"><link rel="prefetch" href="/ranorex/assets/js/122.032c678d.js"><link rel="prefetch" href="/ranorex/assets/js/123.eb9008e6.js"><link rel="prefetch" href="/ranorex/assets/js/124.f5292d2e.js"><link rel="prefetch" href="/ranorex/assets/js/125.beb974f6.js"><link rel="prefetch" href="/ranorex/assets/js/126.9f88017d.js"><link rel="prefetch" href="/ranorex/assets/js/127.f4c87258.js"><link rel="prefetch" href="/ranorex/assets/js/128.78d08b92.js"><link rel="prefetch" href="/ranorex/assets/js/129.4e2a844b.js"><link rel="prefetch" href="/ranorex/assets/js/13.a74ad4f9.js"><link rel="prefetch" href="/ranorex/assets/js/130.d932d49c.js"><link rel="prefetch" href="/ranorex/assets/js/131.806d56c7.js"><link rel="prefetch" href="/ranorex/assets/js/132.4b7ac652.js"><link rel="prefetch" href="/ranorex/assets/js/133.4108c727.js"><link rel="prefetch" href="/ranorex/assets/js/134.18bb194b.js"><link rel="prefetch" href="/ranorex/assets/js/135.faa7bdfb.js"><link rel="prefetch" href="/ranorex/assets/js/136.64c7bb26.js"><link rel="prefetch" href="/ranorex/assets/js/137.ee7cb289.js"><link rel="prefetch" href="/ranorex/assets/js/138.817ba517.js"><link rel="prefetch" href="/ranorex/assets/js/139.cbf6a8f8.js"><link rel="prefetch" href="/ranorex/assets/js/14.c311c2eb.js"><link rel="prefetch" href="/ranorex/assets/js/140.a5fd0ae8.js"><link rel="prefetch" href="/ranorex/assets/js/141.84ee2a82.js"><link rel="prefetch" href="/ranorex/assets/js/142.269f8ac7.js"><link rel="prefetch" href="/ranorex/assets/js/143.43bebccc.js"><link rel="prefetch" href="/ranorex/assets/js/144.db8e827d.js"><link rel="prefetch" href="/ranorex/assets/js/145.30299db4.js"><link rel="prefetch" href="/ranorex/assets/js/146.16feb8bc.js"><link rel="prefetch" href="/ranorex/assets/js/147.5053e695.js"><link rel="prefetch" href="/ranorex/assets/js/148.a353c0d0.js"><link rel="prefetch" href="/ranorex/assets/js/149.f7be3fd1.js"><link rel="prefetch" href="/ranorex/assets/js/15.5b5da565.js"><link rel="prefetch" href="/ranorex/assets/js/150.aebc318d.js"><link rel="prefetch" href="/ranorex/assets/js/151.78186895.js"><link rel="prefetch" href="/ranorex/assets/js/152.d35200c7.js"><link rel="prefetch" href="/ranorex/assets/js/153.f014da37.js"><link rel="prefetch" href="/ranorex/assets/js/154.ca999665.js"><link rel="prefetch" href="/ranorex/assets/js/155.ea29a8a4.js"><link rel="prefetch" href="/ranorex/assets/js/156.be070fc1.js"><link rel="prefetch" href="/ranorex/assets/js/157.e162b8df.js"><link rel="prefetch" href="/ranorex/assets/js/158.4a6a6361.js"><link rel="prefetch" href="/ranorex/assets/js/159.df1cd3e8.js"><link rel="prefetch" href="/ranorex/assets/js/16.517d2bf7.js"><link rel="prefetch" href="/ranorex/assets/js/160.a4487bbc.js"><link rel="prefetch" href="/ranorex/assets/js/161.6bfd61ec.js"><link rel="prefetch" href="/ranorex/assets/js/162.54b97f63.js"><link rel="prefetch" href="/ranorex/assets/js/163.546cbc2d.js"><link rel="prefetch" href="/ranorex/assets/js/164.6d917eec.js"><link rel="prefetch" href="/ranorex/assets/js/165.e8db0c60.js"><link rel="prefetch" href="/ranorex/assets/js/166.ecb721c8.js"><link rel="prefetch" href="/ranorex/assets/js/167.421871c4.js"><link rel="prefetch" href="/ranorex/assets/js/168.66a42727.js"><link rel="prefetch" href="/ranorex/assets/js/169.f81567f5.js"><link rel="prefetch" href="/ranorex/assets/js/17.46f163c9.js"><link rel="prefetch" href="/ranorex/assets/js/170.f8710c05.js"><link rel="prefetch" href="/ranorex/assets/js/171.b8147650.js"><link rel="prefetch" href="/ranorex/assets/js/172.56225d34.js"><link rel="prefetch" href="/ranorex/assets/js/173.c9defd5e.js"><link rel="prefetch" href="/ranorex/assets/js/174.af1ca275.js"><link rel="prefetch" href="/ranorex/assets/js/175.77ca34d4.js"><link rel="prefetch" href="/ranorex/assets/js/176.23345e9c.js"><link rel="prefetch" href="/ranorex/assets/js/177.54361940.js"><link rel="prefetch" href="/ranorex/assets/js/178.1e37212a.js"><link rel="prefetch" href="/ranorex/assets/js/179.62ed8882.js"><link rel="prefetch" href="/ranorex/assets/js/18.31fc3fa8.js"><link rel="prefetch" href="/ranorex/assets/js/180.f132317f.js"><link rel="prefetch" href="/ranorex/assets/js/181.8af8faa3.js"><link rel="prefetch" href="/ranorex/assets/js/182.8e53d080.js"><link rel="prefetch" href="/ranorex/assets/js/183.e23346bd.js"><link rel="prefetch" href="/ranorex/assets/js/184.5707a5ec.js"><link rel="prefetch" href="/ranorex/assets/js/185.72e933f8.js"><link rel="prefetch" href="/ranorex/assets/js/186.5ab5df3c.js"><link rel="prefetch" href="/ranorex/assets/js/187.7bc0cd2f.js"><link rel="prefetch" href="/ranorex/assets/js/188.d04772eb.js"><link rel="prefetch" href="/ranorex/assets/js/189.ec93e32e.js"><link rel="prefetch" href="/ranorex/assets/js/19.87c7b84c.js"><link rel="prefetch" href="/ranorex/assets/js/190.a7fb60b7.js"><link rel="prefetch" href="/ranorex/assets/js/191.1311fdf8.js"><link rel="prefetch" href="/ranorex/assets/js/192.fdb56a50.js"><link rel="prefetch" href="/ranorex/assets/js/193.ede5e502.js"><link rel="prefetch" href="/ranorex/assets/js/194.b2a507be.js"><link rel="prefetch" href="/ranorex/assets/js/195.cb637aed.js"><link rel="prefetch" href="/ranorex/assets/js/196.91b45481.js"><link rel="prefetch" href="/ranorex/assets/js/197.647081cc.js"><link rel="prefetch" href="/ranorex/assets/js/198.1fc0e321.js"><link rel="prefetch" href="/ranorex/assets/js/199.a1811557.js"><link rel="prefetch" href="/ranorex/assets/js/20.11d86716.js"><link rel="prefetch" href="/ranorex/assets/js/200.529b8f26.js"><link rel="prefetch" href="/ranorex/assets/js/201.89d0ca7e.js"><link rel="prefetch" href="/ranorex/assets/js/202.fe52c70f.js"><link rel="prefetch" href="/ranorex/assets/js/203.6f6e1151.js"><link rel="prefetch" href="/ranorex/assets/js/204.a18e0686.js"><link rel="prefetch" href="/ranorex/assets/js/205.dce5aeb8.js"><link rel="prefetch" href="/ranorex/assets/js/206.86d980ef.js"><link rel="prefetch" href="/ranorex/assets/js/207.3824dcf1.js"><link rel="prefetch" href="/ranorex/assets/js/208.aa988fe9.js"><link rel="prefetch" href="/ranorex/assets/js/209.9540bd0c.js"><link rel="prefetch" href="/ranorex/assets/js/21.2f877862.js"><link rel="prefetch" href="/ranorex/assets/js/210.b341c6c4.js"><link rel="prefetch" href="/ranorex/assets/js/211.2cbc9d79.js"><link rel="prefetch" href="/ranorex/assets/js/212.4a64d44c.js"><link rel="prefetch" href="/ranorex/assets/js/213.ca28b285.js"><link rel="prefetch" href="/ranorex/assets/js/214.e34e9a0b.js"><link rel="prefetch" href="/ranorex/assets/js/215.636e42f1.js"><link rel="prefetch" href="/ranorex/assets/js/216.660d864f.js"><link rel="prefetch" href="/ranorex/assets/js/217.b9b06dc0.js"><link rel="prefetch" href="/ranorex/assets/js/218.b72b06a6.js"><link rel="prefetch" href="/ranorex/assets/js/219.d88eba90.js"><link rel="prefetch" href="/ranorex/assets/js/22.3bc073fc.js"><link rel="prefetch" href="/ranorex/assets/js/220.fdb43715.js"><link rel="prefetch" href="/ranorex/assets/js/221.8d545255.js"><link rel="prefetch" href="/ranorex/assets/js/222.b5dcd6b4.js"><link rel="prefetch" href="/ranorex/assets/js/223.33fa7c57.js"><link rel="prefetch" href="/ranorex/assets/js/224.f1da1ddc.js"><link rel="prefetch" href="/ranorex/assets/js/225.fa6a9452.js"><link rel="prefetch" href="/ranorex/assets/js/226.18a3865a.js"><link rel="prefetch" href="/ranorex/assets/js/23.cc718ca8.js"><link rel="prefetch" href="/ranorex/assets/js/24.86da407f.js"><link rel="prefetch" href="/ranorex/assets/js/25.44ab817a.js"><link rel="prefetch" href="/ranorex/assets/js/26.3fcc706f.js"><link rel="prefetch" href="/ranorex/assets/js/27.231b3e27.js"><link rel="prefetch" href="/ranorex/assets/js/28.42e916de.js"><link rel="prefetch" href="/ranorex/assets/js/29.2ed95375.js"><link rel="prefetch" href="/ranorex/assets/js/3.ae597d9c.js"><link rel="prefetch" href="/ranorex/assets/js/30.393ae7bc.js"><link rel="prefetch" href="/ranorex/assets/js/31.5786a183.js"><link rel="prefetch" href="/ranorex/assets/js/32.5d888ff6.js"><link rel="prefetch" href="/ranorex/assets/js/33.893cd8eb.js"><link rel="prefetch" href="/ranorex/assets/js/34.ad372005.js"><link rel="prefetch" href="/ranorex/assets/js/35.e5c48070.js"><link rel="prefetch" href="/ranorex/assets/js/36.d4e0c135.js"><link rel="prefetch" href="/ranorex/assets/js/37.616da736.js"><link rel="prefetch" href="/ranorex/assets/js/38.2432a079.js"><link rel="prefetch" href="/ranorex/assets/js/39.077a9ab0.js"><link rel="prefetch" href="/ranorex/assets/js/4.22fd3e1a.js"><link rel="prefetch" href="/ranorex/assets/js/40.e8eaccc8.js"><link rel="prefetch" href="/ranorex/assets/js/41.76a9eede.js"><link rel="prefetch" href="/ranorex/assets/js/42.89ea171c.js"><link rel="prefetch" href="/ranorex/assets/js/43.f856cbbb.js"><link rel="prefetch" href="/ranorex/assets/js/44.58030fb1.js"><link rel="prefetch" href="/ranorex/assets/js/45.3d09c2fa.js"><link rel="prefetch" href="/ranorex/assets/js/46.b245fc56.js"><link rel="prefetch" href="/ranorex/assets/js/47.494dd65b.js"><link rel="prefetch" href="/ranorex/assets/js/48.c7d2f3a7.js"><link rel="prefetch" href="/ranorex/assets/js/49.52df2632.js"><link rel="prefetch" href="/ranorex/assets/js/5.02a8399a.js"><link rel="prefetch" href="/ranorex/assets/js/50.3c28e691.js"><link rel="prefetch" href="/ranorex/assets/js/51.e2f5377f.js"><link rel="prefetch" href="/ranorex/assets/js/52.844322fe.js"><link rel="prefetch" href="/ranorex/assets/js/53.8a8df773.js"><link rel="prefetch" href="/ranorex/assets/js/54.4c825266.js"><link rel="prefetch" href="/ranorex/assets/js/55.3a7ca993.js"><link rel="prefetch" href="/ranorex/assets/js/56.e54f166f.js"><link rel="prefetch" href="/ranorex/assets/js/57.cc924439.js"><link rel="prefetch" href="/ranorex/assets/js/58.cb9ba99e.js"><link rel="prefetch" href="/ranorex/assets/js/59.c5fcda1f.js"><link rel="prefetch" href="/ranorex/assets/js/6.4754e26a.js"><link rel="prefetch" href="/ranorex/assets/js/60.24be2f8a.js"><link rel="prefetch" href="/ranorex/assets/js/61.8a79a1e2.js"><link rel="prefetch" href="/ranorex/assets/js/62.779cd8cc.js"><link rel="prefetch" href="/ranorex/assets/js/63.0b02161d.js"><link rel="prefetch" href="/ranorex/assets/js/64.d7cfb4a7.js"><link rel="prefetch" href="/ranorex/assets/js/66.12137ec5.js"><link rel="prefetch" href="/ranorex/assets/js/67.64d0d99e.js"><link rel="prefetch" href="/ranorex/assets/js/68.25768680.js"><link rel="prefetch" href="/ranorex/assets/js/69.500ef0be.js"><link rel="prefetch" href="/ranorex/assets/js/7.8d47de9d.js"><link rel="prefetch" href="/ranorex/assets/js/70.f4b799ee.js"><link rel="prefetch" href="/ranorex/assets/js/71.424c1aaf.js"><link rel="prefetch" href="/ranorex/assets/js/72.c1722c32.js"><link rel="prefetch" href="/ranorex/assets/js/73.800e02b7.js"><link rel="prefetch" href="/ranorex/assets/js/74.489b5d01.js"><link rel="prefetch" href="/ranorex/assets/js/75.76fa560b.js"><link rel="prefetch" href="/ranorex/assets/js/76.2a26441d.js"><link rel="prefetch" href="/ranorex/assets/js/77.8a96a11b.js"><link rel="prefetch" href="/ranorex/assets/js/78.34af3c22.js"><link rel="prefetch" href="/ranorex/assets/js/79.2d89654c.js"><link rel="prefetch" href="/ranorex/assets/js/8.6f02a10d.js"><link rel="prefetch" href="/ranorex/assets/js/80.6c0ca93e.js"><link rel="prefetch" href="/ranorex/assets/js/81.c09d0fd2.js"><link rel="prefetch" href="/ranorex/assets/js/82.3df88271.js"><link rel="prefetch" href="/ranorex/assets/js/83.85dea9b4.js"><link rel="prefetch" href="/ranorex/assets/js/84.f56aeffe.js"><link rel="prefetch" href="/ranorex/assets/js/85.0ec1a20c.js"><link rel="prefetch" href="/ranorex/assets/js/86.ec0f5847.js"><link rel="prefetch" href="/ranorex/assets/js/87.5da46a4d.js"><link rel="prefetch" href="/ranorex/assets/js/88.2d708653.js"><link rel="prefetch" href="/ranorex/assets/js/89.cd2fa46c.js"><link rel="prefetch" href="/ranorex/assets/js/9.9807028d.js"><link rel="prefetch" href="/ranorex/assets/js/90.2efdfcfa.js"><link rel="prefetch" href="/ranorex/assets/js/91.49e45a90.js"><link rel="prefetch" href="/ranorex/assets/js/92.4d4955eb.js"><link rel="prefetch" href="/ranorex/assets/js/93.17f244d4.js"><link rel="prefetch" href="/ranorex/assets/js/94.c284a118.js"><link rel="prefetch" href="/ranorex/assets/js/95.87b602b5.js"><link rel="prefetch" href="/ranorex/assets/js/96.27de0e47.js"><link rel="prefetch" href="/ranorex/assets/js/97.98b0f16b.js"><link rel="prefetch" href="/ranorex/assets/js/98.7a8215d4.js"><link rel="prefetch" href="/ranorex/assets/js/99.123858a8.js">
    <link rel="stylesheet" href="/ranorex/assets/css/0.styles.4f9f6236.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/ranorex/" class="home-link router-link-active"><img src="/ranorex/img/RX-logo.png" alt="Ranorex Studio用户手册" class="logo"> <span class="site-name can-hide">Ranorex Studio用户手册</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/ranorex/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="基础" class="dropdown-title"><a href="/ranorex/pages/978dd7/" class="link-title">基础</a> <span class="title" style="display:none;">基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/db051d/" class="nav-link">在20分钟内了解 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d5a062/" class="nav-link">Ranorex Studio</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d8d817/" class="nav-link">Ranorex 录制器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1f8583/" class="nav-link">测试套件</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/3ff037/" class="nav-link">动作</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/980f3d/" class="nav-link">控件库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/2c14f7/" class="nav-link">验证测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8b8105/" class="nav-link">白名单</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/894a89/" class="nav-link">报告</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="高级" class="dropdown-title"><a href="/ranorex/pages/11401f/" class="link-title">高级</a> <span class="title" style="display:none;">高级</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/554573/" class="nav-link">数据驱动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/331ecc/" class="nav-link">追踪UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6943ae/" class="nav-link">Ranorex Spy</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/134d22/" class="nav-link">UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/686444/" class="nav-link">RanoreXPath</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/64711f/" class="nav-link">基于图像的自动化</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/005bb9/" class="nav-link">维护模式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/11012a/" class="nav-link">性能跟踪</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="专家" class="dropdown-title"><a href="/ranorex/pages/9af963/" class="link-title">专家</a> <span class="title" style="display:none;">专家</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/2f0192/" class="nav-link">映射动态UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/ecebd0/" class="nav-link">RanoreXPath 中的正则表达式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/847ee6/" class="nav-link">用户代码库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/b31e73/" class="nav-link">代码模块</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/811ea3/" class="nav-link">Ranorex Studio 集成开发环境</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f87d8c/" class="nav-link">Ranorex 自动化助手</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="网页和移动测试" class="dropdown-title"><a href="/ranorex/pages/7ccd5d/" class="link-title">网页和移动测试</a> <span class="title" style="display:none;">网页和移动测试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/d74538/" class="nav-link">Web测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/645c60/" class="nav-link">端点</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6d8643/" class="nav-link">移动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/dfc2b0/" class="nav-link">高级移动测试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="接口和连接" class="dropdown-title"><a href="/ranorex/pages/89b55d/" class="link-title">接口和连接</a> <span class="title" style="display:none;">接口和连接</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b79789/" class="nav-link">Ranorex仪器向导</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/43beb2/" class="nav-link">技术仪器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7bcce0/" class="nav-link">源代码控制和修订控制</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7d74b6/" class="nav-link">XCOPY 部署</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/18df29/" class="nav-link">持续集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/88ee43/" class="nav-link">TestRail 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/9c9cdb/" class="nav-link">Applitools Eyes 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f9f2a2/" class="nav-link">远程桌面的 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1121bd/" class="nav-link">Visual Studio 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/fc83cd/" class="nav-link">Selenium Webdriver 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/38db78/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统详细信息" class="dropdown-title"><a href="/ranorex/pages/92d4ae/" class="link-title">系统详细信息</a> <span class="title" style="display:none;">系统详细信息</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b40b84/" class="nav-link">证书</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d75d8f/" class="nav-link">设置和配置</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/0f08c7/" class="nav-link">系统要求</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/86b798/" class="nav-link">64位平台</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/31b776/" class="nav-link">静默安装</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="实践应用主题" class="dropdown-title"><a href="/ranorex/pages/74e52a/" class="link-title">实践应用主题</a> <span class="title" style="display:none;">实践应用主题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/5011c0/" class="nav-link">构建您的测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/83d6aa/" class="nav-link">常见问题的解决方案</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8ea041/" class="nav-link">最佳实践</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/93ab6d/" class="nav-link">代码示例</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/ranorex/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="基础" class="dropdown-title"><a href="/ranorex/pages/978dd7/" class="link-title">基础</a> <span class="title" style="display:none;">基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/db051d/" class="nav-link">在20分钟内了解 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d5a062/" class="nav-link">Ranorex Studio</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d8d817/" class="nav-link">Ranorex 录制器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1f8583/" class="nav-link">测试套件</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/3ff037/" class="nav-link">动作</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/980f3d/" class="nav-link">控件库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/2c14f7/" class="nav-link">验证测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8b8105/" class="nav-link">白名单</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/894a89/" class="nav-link">报告</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="高级" class="dropdown-title"><a href="/ranorex/pages/11401f/" class="link-title">高级</a> <span class="title" style="display:none;">高级</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/554573/" class="nav-link">数据驱动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/331ecc/" class="nav-link">追踪UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6943ae/" class="nav-link">Ranorex Spy</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/134d22/" class="nav-link">UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/686444/" class="nav-link">RanoreXPath</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/64711f/" class="nav-link">基于图像的自动化</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/005bb9/" class="nav-link">维护模式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/11012a/" class="nav-link">性能跟踪</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="专家" class="dropdown-title"><a href="/ranorex/pages/9af963/" class="link-title">专家</a> <span class="title" style="display:none;">专家</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/2f0192/" class="nav-link">映射动态UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/ecebd0/" class="nav-link">RanoreXPath 中的正则表达式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/847ee6/" class="nav-link">用户代码库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/b31e73/" class="nav-link">代码模块</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/811ea3/" class="nav-link">Ranorex Studio 集成开发环境</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f87d8c/" class="nav-link">Ranorex 自动化助手</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="网页和移动测试" class="dropdown-title"><a href="/ranorex/pages/7ccd5d/" class="link-title">网页和移动测试</a> <span class="title" style="display:none;">网页和移动测试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/d74538/" class="nav-link">Web测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/645c60/" class="nav-link">端点</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6d8643/" class="nav-link">移动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/dfc2b0/" class="nav-link">高级移动测试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="接口和连接" class="dropdown-title"><a href="/ranorex/pages/89b55d/" class="link-title">接口和连接</a> <span class="title" style="display:none;">接口和连接</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b79789/" class="nav-link">Ranorex仪器向导</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/43beb2/" class="nav-link">技术仪器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7bcce0/" class="nav-link">源代码控制和修订控制</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7d74b6/" class="nav-link">XCOPY 部署</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/18df29/" class="nav-link">持续集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/88ee43/" class="nav-link">TestRail 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/9c9cdb/" class="nav-link">Applitools Eyes 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f9f2a2/" class="nav-link">远程桌面的 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1121bd/" class="nav-link">Visual Studio 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/fc83cd/" class="nav-link">Selenium Webdriver 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/38db78/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统详细信息" class="dropdown-title"><a href="/ranorex/pages/92d4ae/" class="link-title">系统详细信息</a> <span class="title" style="display:none;">系统详细信息</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b40b84/" class="nav-link">证书</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d75d8f/" class="nav-link">设置和配置</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/0f08c7/" class="nav-link">系统要求</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/86b798/" class="nav-link">64位平台</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/31b776/" class="nav-link">静默安装</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="实践应用主题" class="dropdown-title"><a href="/ranorex/pages/74e52a/" class="link-title">实践应用主题</a> <span class="title" style="display:none;">实践应用主题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/5011c0/" class="nav-link">构建您的测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/83d6aa/" class="nav-link">常见问题的解决方案</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8ea041/" class="nav-link">最佳实践</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/93ab6d/" class="nav-link">代码示例</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>数据驱动测试</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/ranorex/pages/554573/" class="sidebar-link">介绍</a></li><li><a href="/ranorex/pages/7a588a/" class="sidebar-link">定义变量</a></li><li><a href="/ranorex/pages/4190d1/" class="sidebar-link">管理和分配数据源</a></li><li><a href="/ranorex/pages/9cb150/" class="sidebar-link">数据绑定</a></li><li><a href="/ranorex/pages/0ade87/" class="sidebar-link">执行数据驱动测试</a></li><li><a href="/ranorex/pages/8a7f48/" aria-current="page" class="active sidebar-link">参数</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#添加参数" class="sidebar-link">添加参数</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#参数对话框" class="sidebar-link">参数对话框</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#使用参数" class="sidebar-link">使用参数</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#示例1-提高模块的可重用性" class="sidebar-link">示例1：提高模块的可重用性</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#定义一个变量" class="sidebar-link">定义一个变量</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#定义参数和链接变量" class="sidebar-link">定义参数和链接变量</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#示例2-在测试执行期间跨模块传递值" class="sidebar-link">示例2：在测试执行期间跨模块传递值</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#下载样本解决方案" class="sidebar-link">下载样本解决方案</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#测试说明" class="sidebar-link">测试说明</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#初始测试套件" class="sidebar-link">初始测试套件</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#提取值并将其写入新变量" class="sidebar-link">提取值并将其写入新变量</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#记录计数器值以进行报告" class="sidebar-link">记录计数器值以进行报告</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#创建传输参数" class="sidebar-link">创建传输参数</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#将变量链接到参数" class="sidebar-link">将变量链接到参数</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/8a7f48/#网络测试示例" class="sidebar-link">网络测试示例</a></li></ul></li></ul></li><li><a href="/ranorex/pages/bd1997/" class="sidebar-link">条件和规则</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>跟踪UI元素</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Ranorex Spy</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>UI元素</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>RanoreXPath</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>基于图像的自动化</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>维护模式</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>性能跟踪</span> <span class="arrow right"></span></p> <!----></section></li></ul> <div class="sidebar-slot sidebar-slot-bottom"><!-- 正方形 -->
      <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="3508773082"
          data-ad-format="auto"
          data-full-width-responsive="true"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div></aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-1cd794fe><div class="articleInfo" data-v-1cd794fe><ul class="breadcrumbs" data-v-1cd794fe><li data-v-1cd794fe><a href="/ranorex/" title="首页" class="iconfont icon-home router-link-active" data-v-1cd794fe></a></li> <li data-v-1cd794fe><a href="/ranorex/categories/?category=%E9%AB%98%E7%BA%A7" title="分类" data-v-1cd794fe>高级</a></li> <li data-v-1cd794fe><a href="/ranorex/categories/?category=%E6%95%B0%E6%8D%AE%E9%A9%B1%E5%8A%A8%E6%B5%8B%E8%AF%95" title="分类" data-v-1cd794fe>数据驱动测试</a></li> <!----></ul> <div class="info" data-v-1cd794fe><div title="作者" class="author iconfont icon-touxiang" data-v-1cd794fe><a href="https://github.com/taylortaurus" target="_blank" title="作者" class="beLink" data-v-1cd794fe>TaylorTaurus</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-1cd794fe><a href="javascript:;" data-v-1cd794fe>2021-11-22</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-content"></div></div></div> <h1><img src="">
          参数
        </h1> <div class="page-slot page-slot-top"><!-- 固定100% * 90px可显示，max-height:90px未见显示-->
     <ins class="adsbygoogle"
          style="display:inline-block;width:100%;max-height:90px"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="6625304284"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div> <div class="theme-vdoing-content content__default"><h1 id="译-参数"><a href="#译-参数" class="header-anchor">#</a> [译] 参数</h1> <p><a href="https://www.ranorex.com/help/latest/ranorex-studio-advanced/data-driven-testing/parameters/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/OfficialPage-ClickMe-blue.svg?longCache=true&amp;style=flat-square" alt=""><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p><a href="https://github.com/taylortaurus" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Translator-TaylorTaurus-42B983.svg?longCache=true&amp;style=flat-square" alt=""><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> <img src="https://img.shields.io/badge/TranslateTime-2019%E5%B9%B49%E6%9C%8829%E6%97%A5-green.svg?longCache=true&amp;style=flat-square" alt=""></p> <hr> <p>在本章中，您将学习什么是参数，如何添加它们以及可以使用它们。</p> <p>可以将参数视为只有一行的数据源，即最简单的一种数据源。它们对于保持模块可重用和测试可维护性很有用。它们还允许您将变量值从一个记录模块传递到另一个。</p> <p><strong>本章导视</strong></p> <ul><li><a href="#%E6%B7%BB%E5%8A%A0%E5%8F%82%E6%95%B0">添加参数</a></li> <li><a href="#%E4%BD%BF%E7%94%A8%E5%8F%82%E6%95%B0">使用参数</a></li> <li><a href="#%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E6%8F%90%E9%AB%98%E6%A8%A1%E5%9D%97%E7%9A%84%E5%8F%AF%E9%87%8D%E7%94%A8%E6%80%A7">示例1：提高模块的可重用性</a></li> <li><a href="#%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E5%9C%A8%E6%B5%8B%E8%AF%95%E6%89%A7%E8%A1%8C%E6%9C%9F%E9%97%B4%E8%B7%A8%E6%A8%A1%E5%9D%97%E4%BC%A0%E9%80%92%E5%80%BC">示例2：在测试执行期间跨模块传递值</a></li></ul> <p><strong>视频向导</strong></p> <blockquote><p>视频“参数”将带您了解本章中的信息。<br> <a href="https://www.youtube.com/embed/GoYbOeXh-MU" target="_blank" rel="noopener noreferrer">立即观看<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <h2 id="添加参数"><a href="#添加参数" class="header-anchor">#</a> 添加参数</h2> <p>在项目的“ 属性”对话框的测试套件视图中添加参数。您可以将参数添加到：</p> <ul><li>测试套件项目（=全局参数）</li> <li>测试容器（=本地参数）</li></ul> <p><strong>注意</strong></p> <blockquote><p>将参数添加到项目时，其所有后代都将继承它。</p> <ul><li>对于测试套件项目，这意味着所有测试容器都将继承它。</li> <li>对于测试容器，这意味着后代测试容器将继承它，而不继承其兄弟姐妹或父代。</li></ul></blockquote> <h3 id="参数对话框"><a href="#参数对话框" class="header-anchor">#</a> <strong>参数对话框</strong></h3> <p>要访问添加参数对话框：</p> <ol><li>右键单击要向其添加参数的项目，然后…</li></ol> <p>a.…对于测试套件，请单击Global parameters…。</p> <p>b.…对于测试容器，单击数据绑定…。</p> <p><img src="/ranorex/img/B1070-0000010.png" alt="B1070-0000010"></p> <p><img src="/ranorex/img/B1070-0000020.png" alt="B1070-0000020"></p> <ol><li><p>您添加的参数数量。没有限制。</p></li> <li><p>每个现有参数的名称。单击添加行…以输入新参数的名称。</p></li> <li><p>每个参数的默认值。为新参数分配一个值。任何字符串都是可能的。</p></li> <li><p>每个参数的当前绑定。使用下拉菜单将新参数绑定到一个或多个变量。</p></li> <li><p>斜体字的参数已从祖先继承。只能在祖先中编辑它们。</p></li> <li><p>单击自动创建可为任何未绑定变量自动创建参数。新参数的名称与未绑定变量的名称相同。然后单击“ 自动绑定”以将新参数自动绑定到各个变量。</p></li></ol> <h2 id="使用参数"><a href="#使用参数" class="header-anchor">#</a> 使用参数</h2> <p>在本节中，我们将向您展示两个如何使用参数的示例。</p> <p>第一个示例很简单，对于多种测试都非常有用。它与使用参数来提高记录模块的可重用性有关。</p> <p>第二个例子是更复杂的，并在其应用程序的更多的限制，但仍非常有用的。它涉及在测试执行期间使用参数将值从一个变量传递到另一个记录模块中的另一个变量。这样可以提高效率并减少测试维护。</p> <h2 id="示例1-提高模块的可重用性"><a href="#示例1-提高模块的可重用性" class="header-anchor">#</a> 示例1：提高模块的可重用性</h2> <p><strong>注意</strong></p> <blockquote><p>这个示例很短，因此没有专用的示例解决方案。</p></blockquote> <p>考虑一个提供不同功能的典型AUT。它将这些功能显示在用户通过UI访问的不同屏幕上。</p> <p>例如，Ranorex Studio演示应用程序中有几个选项卡，每个选项卡提供不同的功能：</p> <p><img src="/ranorex/img/B1070-0000030.png" alt="B1070-0000030"></p> <p>要测试这些屏幕，您需要创建几个不同的测试用例，每个屏幕一个。为什么？因为您要在每个屏幕上测试不同的功能，所以每种情况下的测试步骤都会有所不同。但是，第一步始终保持不变：打开AUT并弹出屏幕。它始终包含以下操作：</p> <ol><li>打开AUT。</li> <li>单击要显示的屏幕的选项卡。</li></ol> <p>这使得模块具有高度可重用性，而可重用模块可提高效率。但是有一个问题：在每个测试用例中，要单击的选项卡的名称都不同。</p> <p>解决此问题的最简单，最有效的方法是使用变量和参数。</p> <h3 id="定义一个变量"><a href="#定义一个变量" class="header-anchor">#</a> <strong>定义一个变量</strong></h3> <p>在记录模块StartAUT中，我们将使存储库项目链接到Click操作变量。</p> <ol><li>在演示应用程序的选项卡上定义鼠标单击操作，然后按照<a href="/ranorex/pages/7a588a/">👉定义变量</a>中有关存储库变量的说明进行操作。将变量命名为$ varTab。</li></ol> <p><img src="/ranorex/img/B1070-0000040.png" alt="B1070-0000040"></p> <h3 id="定义参数和链接变量"><a href="#定义参数和链接变量" class="header-anchor">#</a> <strong>定义参数和链接变量</strong></h3> <p>现在，我们将在第一个测试用例（Introduction_testing）中定义一个参数，并将存储库变量绑定到该参数。</p> <ol><li><p>右键单击测试用例，然后单击数据绑定…。</p></li> <li><p>在“ 参数”下，为参数Tab 命名，并为其分配值Introduction。</p></li></ol> <p><strong>注意</strong></p> <blockquote><p>参数值是RanoreXPath中标识UI元素的属性值。对于“简介”标签，该名称为[@ accessiblename =' 简介 ']。对于“测试数据库”选项卡，它将为[@ accessiblename =' 测试数据库 ']。<br>
有关更多信息，请转到Ranorex Studio高级&gt; <a href="/ranorex/pages/686444/">👉RanoreXPath</a></p></blockquote> <ol start="3"><li>将其绑定到变量varTab，然后单击“确定”。</li></ol> <p><img src="/ranorex/img/B1070-0000050.png" alt="B1070-0000050"></p> <ol start="4"><li>对其他测试用例重复此操作，并将参数值替换为标识相应选项卡的属性值，即测试数据库，基于图像的自动化等。</li></ol> <p>就是这样。运行测试时，它将自动通过选项卡。</p> <h2 id="示例2-在测试执行期间跨模块传递值"><a href="#示例2-在测试执行期间跨模块传递值" class="header-anchor">#</a> 示例2：在测试执行期间跨模块传递值</h2> <p>在此示例中，我们将向您展示如何在测试执行期间获取在一个模块中生成的值，并将其传递给同一测试运行中的另一个模块。我们将使用变量，参数和“获取值”操作来完成此操作。</p> <p>为了解释这一点，我们将在Ranorex Studio演示应用程序中使用一个小型数据库测试。</p> <h3 id="下载样本解决方案"><a href="#下载样本解决方案" class="header-anchor">#</a> <strong>下载样本解决方案</strong></h3> <p>由于此示例更加复杂，因此我们为您创建了示例解决方案。下载以下文件以按照说明进行操作。本节末尾提供了完成的样本。</p> <p><strong>示例解决方案</strong></p> <blockquote><p>主题：参数–在模块之间传递值<br>
时间：15分钟<br> <a href="https://www.ranorex.com/rx-media/rx-user-guide/latest/download/RxSampleParameter.zip" target="_blank" rel="noopener noreferrer">立即下载<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <p>安装示例解决方案：</p> <ol><li><p>解压缩到计算机上的任何文件夹。</p></li> <li><p>启动 Ranorex Studio并打开解决方案文件。</p></li></ol> <h3 id="测试说明"><a href="#测试说明" class="header-anchor">#</a> <strong>测试说明</strong></h3> <p>在示例测试中，我们将使用数据驱动的测试将大量人员输入Ranorex Studio演示应用程序的数据库。对于每个条目，显示条目数量的计数器将增加。在测试运行结束时，我们希望将条目总数记录到报告中。</p> <p><img src="/ranorex/img/B1070-0000060.png" alt="B1070-0000060"></p> <h3 id="初始测试套件"><a href="#初始测试套件" class="header-anchor">#</a> <strong>初始测试套件</strong></h3> <p><img src="/ranorex/img/B1070-0000070.png" alt="B1070-0000070"></p> <ol><li><p>启动演示应用程序，然后单击数据库注册。</p></li> <li><p>如前面的子章节所述，前六个记录模块将来自数据源的条目添加到数据库中。</p></li> <li><p>记录模块GetDBCounter将提取计数器值并将其写入变量。</p></li> <li><p>记录模块WriteMaxCounterToReport将计数器值记录到报告中。</p></li> <li><p>关闭AUT。</p></li></ol> <p>计数器值是在测试执行期间动态生成的 ，具体取决于添加的条目数量。例如，取决于数据源的更改或条件的包含，最终数量将有所不同。因此，我们无法可靠地知道测试执行期间的计数器值，否则每次查找都将花费大量的精力。要将正确的值自动记录到报告中，我们将需要使用变量和参数。</p> <h3 id="提取值并将其写入新变量"><a href="#提取值并将其写入新变量" class="header-anchor">#</a> <strong>提取值并将其写入新变量</strong></h3> <p>首先，在测试执行期间添加所有条目之后，我们将使用“获取值”操作提取计数器值，并将其写入新变量：</p> <ol><li><p>打开记录模块GetDBCounter。</p></li> <li><p>添加链接到条目计数器的存储库项目的“获取价值”操作。</p></li> <li><p>创建新变量$ varCounter。计数器的值将被写入该变量。</p></li></ol> <p><img src="/ranorex/img/B1070-0000080.png" alt="B1070-0000080"></p> <h3 id="记录计数器值以进行报告"><a href="#记录计数器值以进行报告" class="header-anchor">#</a> <strong>记录计数器值以进行报告</strong></h3> <p>现在，我们将添加操作以将计数器值记录到报告中。</p> <ol><li><p>打开记录模块WriteMaxCounterToReport。</p></li> <li><p>如下图所示，添加两个新的日志消息操作。</p></li> <li><p>添加新变量$ varWriteCounter。该变量将从GetDBCounter模块接收值并将其记录到报告中。</p></li></ol> <p><img src="/ranorex/img/B1070-0000090.png" alt="B1070-0000090"></p> <h3 id="创建传输参数"><a href="#创建传输参数" class="header-anchor">#</a> <strong>创建传输参数</strong></h3> <p>在测试运行期间，GetDBCounter中的变量现在将接收动态生成的计数器值。但是，WriteMaxCounterToReport中的变量尚无法检索该值，因为变量及其值在其模块本地。我们需要“链接”变量。为此，我们将它们全部绑定到同一参数。</p> <p>链接变量的参数必须位于两个模块的共同祖先中。在我们的例子中，模块位于两个单独的测试容器中，因此第一个共同祖先是测试套件项RxSampleParameter。如果两个模块位于同一测试容器中，则可以在其中添加参数。</p> <ol><li><p>右键单击测试套件项目RxSampleParameter，然后单击全局参数…。</p></li> <li><p>在“ 参数”下，添加一个名为parCounter的参数。</p></li> <li><p>单击确定。</p></li></ol> <p><img src="/ranorex/img/B1070-0000100.png" alt="B1070-0000100"></p> <p><strong>注意</strong></p> <blockquote><p>我们将该值保留为空以表明这是一个在测试执行期间接收其值的参数。您可以输入任何内容；该值将替换为测试运行。</p></blockquote> <h3 id="将变量链接到参数"><a href="#将变量链接到参数" class="header-anchor">#</a> <strong>将变量链接到参数</strong></h3> <p>添加参数后，我们现在可以将变量绑定到该参数并将它们链接在一起。这样，动态生成的值将从一个模块传递到另一个模块。</p> <ol><li><p>右键单击测试用例AddPersonToDB，然后单击数据绑定…。</p></li> <li><p>在“ 参数”下，将继承的参数以斜体形式绑定到变量$ varCounter。</p></li> <li><p>单击确定。</p></li></ol> <p><img src="/ranorex/img/B1070-0000110.png" alt="B1070-0000110"></p> <p>在另一个测试用例中，对第二个变量重复该过程：</p> <ol><li><p>右键单击测试用例WriteReport，然后单击数据绑定…。</p></li> <li><p>在“ 参数”下，将继承的参数以斜体形式绑定到变量$ varWriteCounter。</p></li> <li><p>单击确定。</p></li></ol> <p><img src="/ranorex/img/B1070-0000120.png" alt="B1070-0000120"></p> <p>这样，只要所有模块都可以访问相同的参数，就可以将值从一个模块传递到另一个模块中的另一个模块。自然地，这也仅按时间顺序工作，即，给定模块需要在接收模块之前执行。</p> <p>运行测试后，您将看到计数器值已正确记录到报告中：</p> <p><img src="/ranorex/img/B1070-0000130.png" alt="B1070-0000130"></p> <p><strong>示例解决方案</strong></p> <blockquote><p>主题：参数–在模块之间传递值<br>
时间：15分钟<br> <a href="https://www.ranorex.com/rx-media/rx-user-guide/latest/download/RxSampleParameterComplete.zip" target="_blank" rel="noopener noreferrer">立即下载<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <h3 id="网络测试示例"><a href="#网络测试示例" class="header-anchor">#</a> <strong>网络测试示例</strong></h3> <p>提取和传递动态生成的值在Web测试中也很重要。Ranorex Studio中包含的Web测试示例（Ranorex Studio起始页&gt;示例解决方案&gt; Web示例）演示了以下内容：</p> <p><img src="/ranorex/img/B1070-0000140.png" alt="B1070-0000140"></p> <p>PublishNewPost模块输入帖子标题和内容，然后单击WordPress中的“发布”按钮。当您在WordPress中发布帖子时，它会自动为发布的帖子生成一个唯一的URL。</p> <p>ValidatePost模块中需要此URL ，因此测试可以导航到博客文章并查看其是否正确发布。DeletePost模块中也需要它，以导航到要删除的正确帖子。</p> <p>但是，与演示应用程序中的计数器值一样，我们不知道测试运行期间的URL。</p> <p>因此，模块GetPostURL提取值，将其写入变量，然后将其传递给其他两个模块。除上面的示例中，所有模块都包含在同一测试用例中之外，其工作方式与上一个示例中说明的相同。因此，链接参数位于该测试用例中，并且所有变量都已绑定到该测试用例。</p> <hr></div></div> <div class="page-slot page-slot-bottom"><!-- 横向自适应 -->
      <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="6620245489"
          data-ad-format="auto"
          data-full-width-responsive="true"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div> <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">11/26/2021, 2:14:10 PM</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/ranorex/pages/0ade87/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">执行数据驱动测试</div></a> <a href="/ranorex/pages/bd1997/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">条件和规则</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/ranorex/pages/0ade87/" class="prev">执行数据驱动测试</a></span> <span class="next"><a href="/ranorex/pages/bd1997/">条件和规则</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/ranorex/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/ranorex/" class="router-link-active"><div></div></a> <span></span></dt></dl><dl><dd>02</dd> <dt><a href="/ranorex/pages/93ab6d/"><div>介绍</div></a> <span>11-22</span></dt></dl><dl><dd>03</dd> <dt><a href="/ranorex/pages/efb1ea/"><div>解决元素未找到错误</div></a> <span>11-22</span></dt></dl> <dl><dd></dd> <dt><a href="/ranorex/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2021-2021
    <span></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <div class="custom-html-window custom-html-window-rb" style="display:;"><div class="custom-wrapper"><i class="close-but">×</i> <div><!-- 固定160*160px -->
      <ins class="adsbygoogle"
          style="display:inline-block;max-width:160px;max-height:160px"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="8377369658"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script>
      </div></div></div></div><div class="global-ui"><div></div></div></div>
    <script src="/ranorex/assets/js/app.99bafa68.js" defer></script><script src="/ranorex/assets/js/2.ec9fdd2b.js" defer></script><script src="/ranorex/assets/js/65.5a22e1db.js" defer></script>
  </body>
</html>
